//
//  JPMgmtModel.swift
//
//  Created by 邱仙凯 on 2022/4/8
//  Copyright (c) . All rights reserved.
//

import Foundation
import ObjectMapper

public struct JPMgmtModel: Mappable {
    
    // MARK: Declaration for string constants to be used to decode and also serialize.
    private struct SerializationKeys {
        static let zUnitNm = "z_unit_nm"
        static let zUnit = "z_unit"
        static let zMaxPrice = "z_max_price"
        static let zPigType = "z_pig_type"
        static let zDtradeType = "z_dtrade_type"
        static let clientInfo = "clientInfo"
        static let zAddress = "z_address"
        static let zTitle = "z_title"
        static let zDeptId = "z_dept_id"
        static let zCreateTm = "z_create_tm"
        static let zInvited = "z_invited"
        static let zEndDate = "z_end_date"
        static let picInfo = "picInfo"
        static let zMinPrice = "z_min_price"
        static let zUse = "z_use"
        static let zProductAlias = "z_product_alias"
        static let zProvince = "z_province"
        static let zRecordNo = "z_record_no"
        static let idKey = "id_key"
        static let zDateEnd = "z_date_end"
        static let zOrgNm = "z_org_nm"
        static let zOrgId = "z_org_id"
        static let zAvgWeight = "z_avg_weight"
        static let zDate = "z_date"
        static let zDeptNm = "z_dept_nm"
        static let zGoodsNm = "z_goods_nm"
        static let zTel = "z_tel"
        static let zStaffNm = "z_staff_nm"
        static let zDepositMoney = "z_deposit_money"
        static let zPrice = "z_price"
        static let referencePrice = "z_reference_price"
        
        static let zAutoZb = "z_auto_zb"
        static let zLeastNum = "z_least_num"
        static let zLinkId = "z_link_id"
        static let zStaffId = "z_staff_id"
        static let zCity = "z_city"
        static let zMaxBidNo = "z_max_bid_no"
        static let zBeginDate = "z_begin_date"
        static let zName = "z_name"
        static let zNum = "z_num"
        static let zRange = "z_range"
        static let zProductId = "z_product_id"
        static let zZq = "z_zq"
        static let zAuditMarkName = "z_audit_mark_name"
        static let zAuditMark = "z_audit_mark"
        
        static let zStatusName = "z_status_name"
        static let zContent = "z_content"
        static let zValuationWay = "z_valuation_way"
        static let zValuationWayNm = "z_valuation_way_nm"
        
        static let zProductContractId = "z_product_contract_id"
        static let zProductContractNm = "z_product_contract_nm"
        static let zZcNm = "z_zc_nm"
        static let zZcId = "z_zc_id"
        static let idNew = "id_new"
        static let newFlow = "z_new_flow"
     }
    
    // MARK: Properties
    public var zUnitNm: String?
    public var zUnit: String?
    public var zMaxPrice: String?
    public var zPigType: String?
    public var zDtradeType: String?
    public var clientInfo: [ClientInfo]?
    public var zAddress: String?
    public var zTitle: String?
    public var zDeptId: String?
    public var zCreateTm: String?
    public var zInvited: String?
    public var zEndDate: String?
    public var picInfo: [PicInfo]?
    public var zMinPrice: Int?
    public var zUse: String?
    public var zProductAlias: String?
    public var zProvince: String?
    public var zRecordNo: String?
    public var idKey: String?
    public var zDateEnd: String?
    public var zOrgNm: String?
    public var zOrgId: String?
    public var zAvgWeight: String?
    public var zDate: String?
    public var zDeptNm: String?
    public var zGoodsNm: String?
    public var zTel: String?
    public var zStaffNm: String?
    public var zDepositMoney: String?
    public var zPrice: String?
    public var referencePrice: String?
    
    
    public var zAutoZb: String?
    public var zLeastNum: String?
    public var zLinkId: String?
    public var zStaffId: String?
    public var zCity: String?
    public var zMaxBidNo: String?
    public var zBeginDate: String?
    public var zName: String?
    public var zNum: String?
    public var zRange: String?
    public var zProductId: String?
    public var zZq: String?
    public var zAuditMarkName: String?
    public var zAuditMark: String?
    public var zContent: String?
    
    public var zValuationWay: String?
    public var zValuationWayNm: String?
 
    public var zStatusName: String?
    
    public var zProductContractId: String?
    public var zProductContractNm: String?
    
    public var zZcNm: String?
    public var zZcId: String?
    public var idNew: String?
    public var newFlow: String?
      
    // MARK: ObjectMapper Initializers
    /// Map a JSON object to this class using ObjectMapper.
    ///
    /// - parameter map: A mapping from ObjectMapper.
    public init?(map: Map){
        
    }
    
    /// Map a JSON object to this class using ObjectMapper.
    ///
    /// - parameter map: A mapping from ObjectMapper.
    public mutating func mapping(map: Map) {
        zUnitNm <- map[SerializationKeys.zUnitNm]
        zUnit <- (map[SerializationKeys.zUnit],StringTransform())
        zMaxPrice <- map[SerializationKeys.zMaxPrice]
        zPigType <- map[SerializationKeys.zPigType]
        zDtradeType <- (map[SerializationKeys.zDtradeType],StringTransform())
        clientInfo <- map[SerializationKeys.clientInfo]
        zAddress <- map[SerializationKeys.zAddress]
        zTitle <- map[SerializationKeys.zTitle]
        zDeptId <- (map[SerializationKeys.zDeptId],StringTransform())
        zCreateTm <- map[SerializationKeys.zCreateTm]
        zInvited <- (map[SerializationKeys.zInvited],StringTransform())
        zEndDate <- map[SerializationKeys.zEndDate]
        picInfo <- map[SerializationKeys.picInfo]
        zMinPrice <- map[SerializationKeys.zMinPrice]
        zUse <- (map[SerializationKeys.zUse],StringTransform())
        zProductAlias <- map[SerializationKeys.zProductAlias]
        zProvince <- map[SerializationKeys.zProvince]
        zRecordNo <- map[SerializationKeys.zRecordNo]
        idKey <- (map[SerializationKeys.idKey],StringTransform())
        zDateEnd <- map[SerializationKeys.zDateEnd]
        zOrgNm <- map[SerializationKeys.zOrgNm]
        zOrgId <- (map[SerializationKeys.zOrgId],StringTransform())
        zAvgWeight <- map[SerializationKeys.zAvgWeight]
        zDate <- map[SerializationKeys.zDate]
        zDeptNm <- map[SerializationKeys.zDeptNm]
        zGoodsNm <- map[SerializationKeys.zGoodsNm]
        zTel <- map[SerializationKeys.zTel]
        zStaffNm <- map[SerializationKeys.zStaffNm]
        zDepositMoney <- (map[SerializationKeys.zDepositMoney],StringTransform_test())
        zPrice <- (map[SerializationKeys.zPrice],StringTransform_test())
        referencePrice <- (map[SerializationKeys.referencePrice],StringTransform_test())
        
        
        zAutoZb <- (map[SerializationKeys.zAutoZb],StringTransform())
        zLeastNum <- (map[SerializationKeys.zLeastNum],StringTransform())
        zLinkId <- (map[SerializationKeys.zLinkId],StringTransform())
        zStaffId <- (map[SerializationKeys.zStaffId],StringTransform())
        zCity <- map[SerializationKeys.zCity]
        zMaxBidNo <- (map[SerializationKeys.zMaxBidNo],StringTransform())
        zBeginDate <- map[SerializationKeys.zBeginDate]
        zName <- map[SerializationKeys.zName]
        zNum <- (map[SerializationKeys.zNum],StringTransform())
        zRange <- (map[SerializationKeys.zRange],StringTransform())
        zProductId <- (map[SerializationKeys.zProductId],StringTransform())
        zZq <- map[SerializationKeys.zZq]
        zAuditMarkName <- map[SerializationKeys.zAuditMarkName]
        zAuditMark <- (map[SerializationKeys.zAuditMark],StringTransform())
        
        zStatusName <- map[SerializationKeys.zStatusName]
        zContent <- map[SerializationKeys.zContent]
        
        zValuationWay <- (map[SerializationKeys.zValuationWay],StringTransform())
          zValuationWayNm <- map[SerializationKeys.zValuationWayNm]
     
        zProductContractId <- (map[SerializationKeys.zProductContractId],StringTransform())
        zProductContractNm <- map[SerializationKeys.zProductContractNm]
        zZcId <- (map[SerializationKeys.zZcId],StringTransform())
        zZcNm <- map[SerializationKeys.zZcNm]
        idNew <- map[SerializationKeys.idNew]
        newFlow <- (map[SerializationKeys.newFlow], StringTransform())
          
    }
    
    /// Generates description of the object in the form of a NSDictionary.
    ///
    /// - returns: A Key value pair containing all valid values in the object.
    public func dictionaryRepresentation() -> [String: Any] {
        var dictionary: [String: Any] = [:]
        if let value = zUnitNm { dictionary[SerializationKeys.zUnitNm] = value }
        if let value = zUnit { dictionary[SerializationKeys.zUnit] = value }

        if let value = zMaxPrice { dictionary[SerializationKeys.zMaxPrice] = value }
        if let value = zPigType { dictionary[SerializationKeys.zPigType] = value }
        if let value = zDtradeType { dictionary[SerializationKeys.zDtradeType] = value }
        if let value = zAddress { dictionary[SerializationKeys.zAddress] = value }
        if let value = zTitle { dictionary[SerializationKeys.zTitle] = value }
        if let value = zDeptId { dictionary[SerializationKeys.zDeptId] = value }
        if let value = zCreateTm { dictionary[SerializationKeys.zCreateTm] = value }
        if let value = zInvited { dictionary[SerializationKeys.zInvited] = value }
        if let value = zEndDate { dictionary[SerializationKeys.zEndDate] = value }
        if let value = zMinPrice { dictionary[SerializationKeys.zMinPrice] = value }
        if let value = zUse { dictionary[SerializationKeys.zUse] = value }
        if let value = zProductAlias { dictionary[SerializationKeys.zProductAlias] = value }
        if let value = zProvince { dictionary[SerializationKeys.zProvince] = value }
        if let value = zRecordNo { dictionary[SerializationKeys.zRecordNo] = value }
        if let value = idKey { dictionary[SerializationKeys.idKey] = value }
        if let value = zDateEnd { dictionary[SerializationKeys.zDateEnd] = value }
        if let value = zOrgNm { dictionary[SerializationKeys.zOrgNm] = value }
        if let value = zOrgId { dictionary[SerializationKeys.zOrgId] = value }
        if let value = zAvgWeight { dictionary[SerializationKeys.zAvgWeight] = value }
        if let value = zDate { dictionary[SerializationKeys.zDate] = value }
        if let value = zDeptNm { dictionary[SerializationKeys.zDeptNm] = value }
        if let value = zGoodsNm { dictionary[SerializationKeys.zGoodsNm] = value }
        if let value = zTel { dictionary[SerializationKeys.zTel] = value }
        if let value = zStaffNm { dictionary[SerializationKeys.zStaffNm] = value }
        if let value = zDepositMoney { dictionary[SerializationKeys.zDepositMoney] = value }
        if let value = zPrice { dictionary[SerializationKeys.zPrice] = value }
        if let value = referencePrice { dictionary[SerializationKeys.referencePrice] = value }
        if let value = idNew { dictionary[SerializationKeys.idNew] = value }

        
        if let value = zAutoZb { dictionary[SerializationKeys.zAutoZb] = value }
        if let value = zLeastNum { dictionary[SerializationKeys.zLeastNum] = value }
        if let value = zLinkId { dictionary[SerializationKeys.zLinkId] = value }
        if let value = zStaffId { dictionary[SerializationKeys.zStaffId] = value }
        if let value = zCity { dictionary[SerializationKeys.zCity] = value }
        if let value = zMaxBidNo { dictionary[SerializationKeys.zMaxBidNo] = value }
        if let value = zBeginDate { dictionary[SerializationKeys.zBeginDate] = value }
        if let value = zName { dictionary[SerializationKeys.zName] = value }
        if let value = zNum { dictionary[SerializationKeys.zNum] = value }
        if let value = zRange { dictionary[SerializationKeys.zRange] = value }
        if let value = zProductId { dictionary[SerializationKeys.zProductId] = value }
        if let value = zZq { dictionary[SerializationKeys.zZq] = value }
        if let value = zAuditMarkName { dictionary[SerializationKeys.zAuditMarkName] = value }
        if let value = zAuditMark { dictionary[SerializationKeys.zAuditMark] = value }
        
        if let value = zStatusName { dictionary[SerializationKeys.zStatusName] = value }
        
        if let value = zContent { dictionary[SerializationKeys.zContent] = value }
        
        if let value = zValuationWay { dictionary[SerializationKeys.zValuationWay] = value }
        if let value = zValuationWayNm { dictionary[SerializationKeys.zValuationWayNm] = value }
        if let value = zProductContractId { dictionary[SerializationKeys.zProductContractId] = value }
        if let value = zProductContractNm { dictionary[SerializationKeys.zProductContractNm] = value }
        
        if let value = zZcId { dictionary[SerializationKeys.zZcId] = value }
        if let value = zZcNm { dictionary[SerializationKeys.zZcNm] = value }
        if let value = newFlow { dictionary[SerializationKeys.newFlow] = value }
      
        return dictionary
    }
    
}
